package cwiczenia.cwiczenia6.zad3;


public class Cukierek {
    private String smak;
    private double waga;

    public Cukierek(String smak, double waga) {
        this.smak = smak;
        this.waga = waga;
    }

    public void show() {
        System.out.println("Cukierek o smaku " + smak + " i wadze " + waga);
    }

    public String toString() {   // metida "zwracajaca" stringa - od razu
        return "Cukierek[smak = " + smak + ", waga = " + waga + "]";
    }
}